﻿
@{
    Layout = null;
}
@model justice.Models.justice_user
<!DOCTYPE html>
<html>
<head>
    <title>Construction a Real Estates and Builders Category Flat bootstrap Responsive website Template | Home :: w3layouts</title>
    <link href="~/Content/bootstrap.css" rel="stylesheet" type="text/css" media="all">
    <link href="~/Content/style.css" rel="stylesheet" type="text/css" media="all" />
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <meta name="keywords" content="Construction  Responsive web template, Bootstrap Web Templates, Flat Web Templates, Android Compatible web template,
Smartphone Compatible web template, free webdesigns for Nokia, Samsung, LG, SonyErricsson, Motorola web design" />
    <script type="application/x-javascript"> addEventListener("load", function() { setTimeout(hideURLbar, 0); }, false); function hideURLbar(){ window.scrollTo(0,1); } </script>

    <script src="~/Scripts/jquery-1.10.2.min.js"></script>
    <link rel="stylesheet" href="~/Content/flexslider.css" type="text/css" media="screen" />
    <script src="~/Scripts/responsiveslides.min.js"></script>
    <script>
    $(function () {
      $("#slider").responsiveSlides({
      	auto: true,
      	nav: true,
      	speed: 500,
        namespace: "callbacks",
        pager: true,
      });
    });

    </script>
    <script src="~/Scripts/bootstrap.js"></script>
    <!--startsmothscrolling-->
    <script type="text/javascript" src="~/Scripts/move-top.js"></script>
    <script type="text/javascript" src="~/Scripts/easing.js"></script>
    <script type="text/javascript">
		jQuery(document).ready(function($) {
			$(".scroll").click(function(event){
				event.preventDefault();
				$('html,body').animate({scrollTop:$(this.hash).offset().top},1200);
			});
		});
    </script>
    <!--endsmothscrolling-->
    <link rel="stylesheet" href="~/Content/swipebox.css">
    <script src="~/Scripts/jquery.swipebox.min.js"></script>
    <script type="text/javascript">
					jQuery(function($) {
						$(".swipebox").swipebox();
					});
    </script>
    <style>
        body {
            background: url("../../images/banner.jpg");
        }

        .navbar-inverse, .footer-section {
            background-color: #323639;
        }

        .body-content {
            margin-top: 20px;
            font-family: '黑体';
        }

        footer {
            margin-top: 20px;
        }

        p, h1, h2, .userd {
            color: white;
        }

        .t {
            width: 30px;
            border-radius: 100%;
        }

        .caret {
            color: white;
        }

        .buttons {
            font-size: 17px;
        }

        label {
            font-weight: 500;
        }

        .table > tbody > tr > th {
            background-color: #94979C;
            color: white;
            font-weight: 500;
            font-size: 15px;
        }

        .navbar-default .navbar-nav > li > a {
            font-size: 18px;
        }

        .navbar-collapse {
            font-family: '黑体';
        }
        table {
            background-color: white;
            color: black;
            width: 90%;
            margin: auto;
            border-radius: 3px;
            text-align: center;
        }

        th {
            text-align: center;
            background-color: #585858;
        }

        .page-btn {
            width: 90%;
            text-align: center;
            color: white;
        }

        .page-input {
            width: 5%;
            border-radius: 6px;
            color: black;
            text-align: center;
        }

        .th-1 {
            border-top-left-radius: 3px;
        }

        .th-5 {
            border-top-right-radius: 3px;
        }

        #dsja {
            text-align:center;
            left:-1px;
        }
        footer {
            position: fixed;
            left: 0;
            bottom: 0;
            width: 100%;
        }
        a:link,a{
            text-decoration:none;
        }
        .dao{
            cursor:pointer;
        }
        .mydropdown-menu{
            margin-top:3px;
            background-color:white;
            position:absolute;
            display:none;
            border:1px solid #A5A7A5;
            border-radius:2px;
            text-align:left;
        }
        .mydropdown-menu>div,.mydropdown-menu>button{
            margin:10px;
        }
        .mydropdown-menu>button{
            background-color:#B1B5B0;
        }
        .table>tbody>tr>td{
            font-size:15px;
        }
        .table td, .table>tbody>tr>td{
            padding:8px!important;
        }
        .table{
            margin-bottom:10px;
        }
        label{
            margin-bottom:0;
        }
    </style>
    <script>
        $(function () {
            downwz();
            window.onresize = function () {
                downwz();
            }
            var awidth = $('#dsj').width();
            $('#dsja').width(awidth);

            var mydrop;

            $('.do').click(function () {
                $('.do').next().hide();
                $(this).next().fadeToggle(100);
                $(this).next().attr('class','mydropdown-menu dropopen');
                mydrop = $(this).next();
                return false;
            });

            $('html').click(function () {
                if (mydrop != null) {
                    $(this).mousedown(function (e) {
                        var dao = $(mydrop);
                        var x = e.pageX;
                        var y = e.pageY;
                        if (x<dao.offset().left || y <dao.offset().top || x>dao.offset().left+dao.width() || y>dao.offset().top+dao.height()) {
                            $(mydrop).hide();
                        }
                    });
                }
            });

            var path = ['/Export/ExportExcel', '/Export/ExportMakingsCirculation', '/Export/ExportForensicExaminationRecord', '/Export/ExportExcel', '/Export/ExportExcel2', '/Export/ExportExcel'];
            $('#educe').click(function () {
                var lab = $('.dropopen input[type=checkbox]');
                var shroffbookid = $(this).next().html();

                var sid = [];
                for (var i = 0; i < lab.length; i++) {
                    if (lab[i].checked){
                        sid.push($(lab[i]).val());
                    }
                }

                console.log(sid);
                var i = 0;
                window.location.href = path[sid[i]] + '/' + shroffbookid;
                i++;
                if (sid.length > 1) {
                    var down = setInterval(function () {
                        window.location.href = path[sid[i]]+'/'+shroffbookid;
                        if (i == sid.length-1) {
                            clearInterval(down);
                        }
                        i++;
                    },1000);
                }
            });

            $('#educeall').click(function () {
                var shroffbookid = $(this).prev().html();

                var i = 0;
                window.location.href = path[i] + '/' + shroffbookid;
                i++;
                var down = setInterval(function () {
                    window.location.href = path[i] + '/' + shroffbookid;
                    if (i == path.length-1) {
                        clearInterval(down);
                    }
                    i++;
                }, 1000);
            });
        });
        function downwz() {
            var daoleft = $('.dao').offset();
            var fuleft = ($('.mydropdown-menu').width() - $('.dao').width()) / 2;
            $('.mydropdown-menu').css({ 'left': daoleft.left - fuleft });
        }
    </script>
</head>
<body>
    <div class="navbar navbar-inverse navbar-fixed-top">
        <div class="container">
            <div class="header-top">
                <div class="logo">
                    <h1><a href="/Home/Index">绵阳市司法平台</a></h1>
                </div>
                <div class="buttons">
                    <img class="t" src="~/images/6.jpg" />
                    @if (Session["rolename"].ToString() == "超级管理员")
                    {
                        <span class="userd">@Session["unitname"]-@Session["username"]</span>
                    }
                    else
                    {
                        <span class="userd">@Session["unitname"]-@Session["username"]-@Session["rolename"]</span>
                    }
                    <a href="/Home/Out" style="margin-left:20px;color:white;">退出</a>
                </div>
                <div class="clearfix"></div>
            </div>
            <div class="header-bottom">
                @{
                    if (ViewBag.mode == null)
                    {
                        justice.Models.justiceEntities dal = new justice.Models.justiceEntities();
                        justice.Models.justice_user user = dal.justice_user.ToList().Find(l => l.id == Convert.ToInt32(Session["uid"]));
                        justice.Models.Role role = dal.Role.ToList().Find(l => l.id == user.role_id);
                        <nav class="navbar navbar-default">
                            <div class="container-fluid">
                                <!-- Brand and toggle get grouped for better mobile display -->
                                <div class="navbar-header">
                                    <button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#bs-example-navbar-collapse-1" aria-expanded="false">
                                        <span class="sr-only">Toggle navigation</span>
                                        <span class="icon-bar"></span>
                                        <span class="icon-bar"></span>
                                        <span class="icon-bar"></span>
                                    </button>
                                </div>
                                <!-- Collect the nav links, forms, and other content for toggling -->
                                <div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1">
                                    <ul class="nav navbar-nav cl-effect-16">
                                        <li><a href="/Home/Index">主页 <span class="sr-only">(current)</span></a></li>
                                        @if (user.unit_id == null && user.insurer_id == null)
                                        {
                                            <li class="dropdown" id="dsj">
                                                <a href="services.html" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false">导出统计汇总表与司鉴月报表<span class="caret"></span></a>
                                                <ul class="dropdown-menu" id="dsja">
                                                    <li><a href="/ExportStatistic/StatisticalSummary">司法鉴定汇总表</a></li>
                                                    <li><a href="/judiciary/Addjudiciaryview">司法鉴定月报表</a></li>
                                                </ul>
                                            </li>
                                        }
                                    </ul>
                                    @{
                                        var controllerName = ViewContext.RouteData.Values["controller"].ToString().ToLower();
                                        <form action="/@controllerName/Search" class="navbar-form navbar-right" role="search">
                                            <div class="form-group">
                                                <input type="text" name="sewhere" class="form-control" placeholder="Search">
                                                <input type="submit" value="">
                                            </div>
                                            <div class="clearfix"></div>
                                        </form>
                                    }
                                </div>
                            </div>
                        </nav>
                                        }
                }
            </div>

        </div>
    </div>
    <div class="container body-content">
        <table class="table table-responsive">
            <tr>
                <th class="th-1">序列</th>
                <th>表格编号</th>
                <th>录入时间</th>
                <th>所属单位</th>
                <th>参与保险公司</th>
                <th class="th-5">操作</th>
            </tr>
            @{
                int i = 0;
                foreach (var item in ViewBag.list)
                {
                    i++;
                    <tr>
                        <td>@i</td>
                        <td>@item.tablenumber</td>
                        <td>@item.time</td>
                        <td>@item.judiciaryName</td>
                        @{
                            if (item.insurerName == null)
                            {
                                <td>未涉保</td>
                            }
                            else
                            {

                                <td>@item.insurerName</td>
                            }
                        }
                        <td>
                            <div class="dao">
                                <div style="color:blue;" class="do">导出</div>
                                <div class="mydropdown-menu">
                                    <div><label><input value="0" type="checkbox" />司法鉴定委托书</label></div>
                                    <div><label><input value="1" type="checkbox" />鉴定材料流转单</label></div>
                                    <div><label><input value="2" type="checkbox" />法医临床学检查笔录</label></div>
                                    <div><label><input value="3" type="checkbox" />送达回证</label></div>
                                    <div><label><input value="4" type="checkbox" />法医学鉴定意见书</label></div>
                                    <div><label><input value="5" type="checkbox" />鉴定委托书评审记录</label></div>
                                    <button class="btn btn-default" id="educe">导出选中</button>
                                    <span class="sokid" style="display:none;">@item.shroffbook_id</span>
                                    <button class="btn btn-default" id="educeall">导出全部</button>
                                </div>
                            </div>
                        </td>
                    </tr>
                            }
            }
        </table>
        <link href="~/Content/page.css" rel="stylesheet" />
        @Html.Partial("Page");
    </div>
    <footer>
        <div class="footer-section">
            <div class="container">
                <div class="footer-top">
                    <p>Copyright &copy; 2016.中国四川省绵阳市司法局。</p>
                </div>
            </div>
        </div>
    </footer>

</body>
</html>
